home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / crt.arc / CRT.TXT next >
Text File  |  1985-11-22  |  10KB  |  595 lines

  1.  
  2.  
  3.  
  4.  
  5.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  6.  
  7.  
  8.         NAME
  9.  
  10.         cursor         Position the screen cursor at passed location
  11.  
  12.  
  13.         SYNOPSIS
  14.  
  15.         int cursor(x,y)
  16.         int x,  /* X coordinate for cursor position */
  17.             y;  /* Y coordinate for cursor position */
  18.  
  19.  
  20.         FUNCTION
  21.  
  22.         Force the IBM PC cursor to the specified location.  Works through 
  23.         direct BIOS calls, (int 10).  NOTE the order of cursor address is 
  24.         X,Y where x is the horizontal position and y the vertical.
  25.  
  26.         RETURNS
  27.  
  28.         Nothing.
  29.  
  30.  
  31.         EXAMPLE
  32.  
  33.           {
  34.           int  x,y;
  35.  
  36.           x = 0;
  37.           y = 10;
  38.           cursor(x,y);  /* move cursor to beginning line 10 */
  39.  
  40.           cursor(40,12);  /* move cursor to center of screen */
  41.           }
  42.  
  43.              
  44.         SEE ALSO
  45.  
  46.         erase, clr_from, clrline
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.                                         1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  72.  
  73.  
  74.         NAME
  75.  
  76.         erase          Clear the entire screen
  77.  
  78.  
  79.         SYNOPSIS
  80.  
  81.         int  erase()
  82.  
  83.  
  84.         FUNCTION
  85.  
  86.         Erase the entire IBM PC screen.  Note this is done through direct 
  87.         BIOS calls to int 10.
  88.  
  89.  
  90.         RETURNS
  91.  
  92.         Nothing.
  93.  
  94.  
  95.         EXAMPLE
  96.  
  97.           {
  98.           erase();    /* screen is now clear */
  99.           }
  100.  
  101.              
  102.         SEE ALSO
  103.  
  104.         cursor, clr_from, clrline
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                         2
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  138.  
  139.  
  140.         NAME
  141.  
  142.         clr_from       Clear the screen from the x,y position down 
  143.  
  144.  
  145.         SYNOPSIS
  146.  
  147.         int clr_from(x,y)
  148.         int x,    /* X coordinate for start of erase */
  149.             y;    /* Y coordinate for start of erase */
  150.  
  151.  
  152.         FUNCTION
  153.  
  154.         Used to erase to the end of the screen.  This routine uses direct 
  155.         BIOS calls to int 10.   Note also that the X coordinate should be 
  156.         0  or  strange  things may happen,  since the erase  is  done  by 
  157.         scrolling a window on the screen.
  158.  
  159.  
  160.         RETURNS
  161.  
  162.         Nothing.
  163.  
  164.  
  165.         EXAMPLE
  166.  
  167.           {
  168.           int x,y;
  169.  
  170.           cursor(0,10),printf("hello there");
  171.           cursor(0,20),printf("Only this line will be erased");
  172.  
  173.           clr_from(0,15);  /* screen is cleared from 0,15 to 79,24 */
  174.           }
  175.  
  176.              
  177.         SEE ALSO
  178.  
  179.         cursor, erase, clrline
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                         3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  204.  
  205.  
  206.         NAME
  207.  
  208.         clrline        Clear the screen to the end of this line
  209.  
  210.  
  211.         SYNOPSIS
  212.  
  213.         int clrline()
  214.  
  215.  
  216.         FUNCTION
  217.  
  218.         Clear  to end of line function.   Locates current cursor position 
  219.         and  clears screen from there to end of the  line.   Uses  direct 
  220.         BIOS calls to int 10.
  221.  
  222.  
  223.         RETURNS
  224.  
  225.         Nothing.
  226.  
  227.  
  228.         EXAMPLE
  229.  
  230.           {
  231.           erase();
  232.           cursor(0,10),printf("Hello world, how are you doing?");
  233.  
  234.           cursor(11,10);
  235.           clrline();    /* erases ", how are you doing?" */
  236.           }
  237.  
  238.              
  239.         SEE ALSO
  240.  
  241.         cursor, erase, clr_from
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                         4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  270.  
  271.  
  272.         NAME
  273.  
  274.         beep           Sound the speaker at a low frequency
  275.  
  276.  
  277.         SYNOPSIS
  278.  
  279.         int  beep()
  280.  
  281.  
  282.         FUNCTION
  283.  
  284.         Sets the speaker frequency to a pleasant low tone and "beeps" for 
  285.         about a quarter second.   This function uses direct access to IBM 
  286.         PC  hardware ports.   The beep is used for error responses in the 
  287.         data field handler routines.
  288.  
  289.  
  290.         RETURNS
  291.  
  292.         Nothing.
  293.  
  294.  
  295.         EXAMPLE
  296.  
  297.           {
  298.           /*-- if the value is good return so, else tell them its bad -*/
  299.           if (a > b)
  300.             return(ok);
  301.           else
  302.             {
  303.             beep();
  304.             return(bad);
  305.             }
  306.           }
  307.  
  308.              
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                                         5
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  336.  
  337.  
  338.         NAME
  339.  
  340.         box            Draw a box using IBM block graphics on screen
  341.  
  342.  
  343.         SYNOPSIS
  344.  
  345.         int box(ulx,uly,lrx,lry)
  346.         int ulx,    /* upper left hand X coordinate of box */
  347.             uly,    /* upper left hand Y coordinate of box */
  348.             lrx,    /* lower right hand X coordinate of box */
  349.             lry;    /* lower right hand Y coordinate of box */
  350.  
  351.  
  352.         FUNCTION
  353.  
  354.         Draw a box using IBM PC block graphics characters on the  screen.  
  355.         You  must pass the routine the upper left hand corner of the  box 
  356.         and the lower right hand corner of the box.  This routine use the 
  357.         bdos library function to perform its work.
  358.  
  359.  
  360.         RETURNS
  361.  
  362.         Nothing.
  363.  
  364.  
  365.         EXAMPLE
  366.  
  367.           {
  368.           box(0,0,79,24);  /* draw a box around the whole screen */
  369.  
  370.           box(10,10,20,20); /* draw a smaller box inside the first */ 
  371.           }
  372.  
  373.              
  374.         SEE ALSO
  375.  
  376.         hline, vline
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                         6
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  402.  
  403.  
  404.         NAME
  405.  
  406.         hline          Draw a horizontal line
  407.  
  408.  
  409.         SYNOPSIS
  410.  
  411.         int hline(character,length)
  412.         int character,    /* character to send to the screen (8 bits) */
  413.             length;       /* number of characters to draw */
  414.  
  415.  
  416.         FUNCTION
  417.  
  418.         Draw  a  horizontal line using the passed character  and  length.  
  419.         This  function  is useful in finishing off boxes,  or ruling  off 
  420.         areas in them.   Uses the bdos library function.   It draws  from 
  421.         the left of the screen to the right.
  422.  
  423.  
  424.         RETURNS
  425.  
  426.         Nothing.
  427.  
  428.  
  429.         EXAMPLE
  430.  
  431.           {
  432.           box(0,0,79,24);  /* draw a big box */
  433.           cursor(30,1),printf("M E N U   T I T L E"); 
  434.           cursor(0,2),bdos(6,204,0);  /* wall of a title block */
  435.           hline(205,78);              /* inside the box */
  436.           bdos(6,185,0);
  437.           }
  438.  
  439.              
  440.         SEE ALSO
  441.  
  442.         box, vline
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                         7
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  468.  
  469.  
  470.         NAME
  471.  
  472.         vline          Draw a vertical line on the screen
  473.  
  474.  
  475.         SYNOPSIS
  476.  
  477.         int vline(x,y,character,length)
  478.         int x,          /* X coordinate to start */
  479.             y,          /* Y coordinate to start */
  480.             character,  /* character to use (int) */
  481.             length;     /* number of characters to draw */
  482.  
  483.  
  484.         FUNCTION
  485.  
  486.         Draw  a vertical line on the screen.   You tell it the starting X 
  487.         and Y address, the character to draw, and the length of the line.  
  488.         The routine uses bdos library function calls.   It draws from the 
  489.         top of the screen down.
  490.  
  491.  
  492.         RETURNS
  493.  
  494.         Nothing.
  495.  
  496.  
  497.         EXAMPLE
  498.  
  499.           {
  500.           erase();
  501.           vline(40,0,186,25);  /* divide the screen in half with a */
  502.                                /* double line character */
  503.           }
  504.  
  505.              
  506.         SEE ALSO
  507.  
  508.         box, hline
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                         8
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.         CRT FILE UTILITIES                              LIBRARY FUNCTIONS
  534.  
  535.  
  536.                                 Lattice Utilities
  537.  
  538.         These object file utilities are being distributed at no charge to 
  539.         all people who are interested in obtaining them.  The BBS form of 
  540.         these files includes only the large code - large data model (-ml) 
  541.         object  files  and matching documentation.   If  these  utilities 
  542.         sound  interesting try them out.   We will supply the source code 
  543.         on an IBM PC DSDD disk to these utilities,  so you can use any of 
  544.         the four memory models, for a price of $25.00.
  545.  
  546.         Users  of this software may incorporate it into any product  they 
  547.         desire.   There  is no charge for this.   You may NOT  sell  this 
  548.         package by itself in any form what so ever.   The only exceptions 
  549.         to  this  are a limited distribution fee for Clubs and  or  Users 
  550.         Groups not to exceed $10.00 per disk.
  551.  
  552.  
  553.                                     Warranty
  554.  
  555.         NONE!   We  are not responsible or liable for any damages  either 
  556.         real  or consequential.   This package is free after  all.   Note 
  557.         that   this  software  has  been  running  in  several  different 
  558.         commercial  packages for three years now so it must do  something 
  559.         right.
  560.  
  561.  
  562.              Copyright 1983, 1984, 1985 by Elfring Consulting, Inc.
  563.  
  564.                                All rights reserved
  565.  
  566.  
  567.  
  568.         Full source code is available for $25.00 from:
  569.  
  570.              Elfring Consulting, Inc.
  571.              4N899 W. Mary Drive
  572.              St. Charles, Illinois
  573.              60174
  574.  
  575.              312-377-3520
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                         9
  591.  
  592.  
  593.  
  594.  
  595.